export default {
  // Global page headers: https://go.nuxtjs.dev/config-head
  head: {
    title: '阿开社区',
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      { hid: 'description', name: 'description', content: '阿开社区，阿开自己做的社区' },
      { hid: 'keywords', name: 'keywords', content: '阿开，社区' },
      { name: 'format-detection', content: 'telephone=no' },
    ],
    link: [
      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
    ]
  },

  // Global CSS: https://go.nuxtjs.dev/config-css
  css: [
    // 'ant-design-vue/dist/antd.less',
    'assets/theme/index.less',
    'assets/css/main.css'
  ],

  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  plugins: [
    '@/plugins/antd-ui',
    { src: "~/plugins/swiper.js", ssr: false },
    { src: '~/plugins/aos.js', ssr: false },
  ],
  // Auto import components: https://go.nuxtjs.dev/config-components
  components: true,

  // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  buildModules: ['@nuxtjs/tailwindcss'],

  // Modules: https://go.nuxtjs.dev/config-modules
  modules: [
    '@nuxtjs/style-resources'
  ],
  styleResources:{
    less:[
      './assets/theme/variable.less'
    ]
  },

  // Build Configuration: https://go.nuxtjs.dev/config-build
  build: {
    extractCSS: true,
    standalone: true,
    extend(config, ctx) {
      config.resolve.alias['swiper$'] = 'swiper/swiper-bundle.js';
    },
    postcss: {
      plugins: {
        'postcss-import': {}
      }
    },
    loaders: {
      less: {
        javascriptEnabled: true,
      }
    }
  },

router: { 
  mode: 'hash',
  base: './' 
},
  generate: {
    subFolders: true
  },
  server:{
    host:'0.0.0.0',
  }
}
